home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / ask_bat.zip / SAMPLE.BAT < prev   
DOS Batch File  |  1989-02-17  |  1KB  |  43 lines

  1. echo off
  2. REM
  3. REM  SAMPLE ASK_BAT USE.  MOST LIKELY USED IN YOUR AUTOEXEC.BAT FILE
  4. REM
  5. cls
  6. echo Sample use of ask_bat
  7. echo ---------------------
  8. REM
  9. REM  Simple Yes/No requested within 5 seconds.  Default is YES.
  10. REM
  11. echo Would you like to perform a chkdsk?
  12. ask_bat Yes 1 No 2 /H /T:5 /P "             (Y/N) ---) "
  13. if errorlevel 2 goto nochk
  14. chkdsk
  15. REM
  16. REM  Just get a keystroke within 2 minutes
  17. REM
  18. ask_bat /H /P "Pick a keystroke, any keystroke ...." /T:120
  19. :nochk
  20. REM
  21. REM  Forced Response within 10 seconds.  (RETURN) alone is invalid.
  22. REM
  23. cls
  24. echo How are you feeling today?
  25. ask_bat "Movin' slow" 1 Happy 2 Sad 3 /H /F /P "<H>appy or <S>ad ? " /T:10
  26. if errorlevel 3 goto sad
  27. if errorlevel 2 goto happy
  28. echo Kinda sluggish aren't we....
  29. goto next
  30. :sad
  31. echo Gee, sorry to hear that :-(
  32. goto next
  33. :happy
  34. echo Great!  Top off your great day by registering a shareware program! :-)
  35. :next
  36. REM
  37. REM  Forced Response, No Hot Keys, Wait indefinatly
  38. REM
  39. ask_bat sure 1 nope 2 /f /p "Start over from the top? (SURE/NOPE) ---)"
  40. if errorlevel 2 goto stop
  41. sample
  42. :stop
  43.